// Copyright  Author(https://github.com/LiuShuKu). All Rights Reserved.

// Copyright (c)  2024 LiuShuKu
// Project Name :   balance
// Author       :   liushuku@yeah.net

// Package okx .
package okx

import (
	"context"
	"tronServer/internal/model/domain"
	"tronServer/internal/service"
	okx_ "tronServer/utility/okx"
)

type sOkx struct {
}

func init() {
	service.RegisterOkx(New())
}

func New() service.IOkx {
	return &sOkx{}
}

// Rate okx 汇率
func (s *sOkx) Rate(ctx context.Context) (okxData *domain.OkxData, err error) {
	if okxData, err = okx_.Okx.UsdtToCnyRate(ctx); err != nil {
		return
	}
	return
}
